import request from '@/utils/request'

export function getList(query) {
  return request({
    url: 'v1/console_script',
    method: 'get',
    params: query
  })
}

export function createScript(data) {
  return request({
    url: 'v1/console_script',
    method: 'post',
    data
  })
}

export function updateScript(data) {
  return request({
    url: 'v1/console_script/' + data.id,
    method: 'put',
    data
  })
}

export function deleteScript(id) {
  return request({
    url: 'v1/console_script/' + id,
    method: 'delete'
  })
}
